@extends("admin.layout.main")

@section("content")
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            专题列表
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"> 专题管理</a></li>
            <li><a href="/admin/topics">专题列表</a></li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <!-- Small boxes (Stat box) -->
        <div class="row">
            <div class="col-lg-12 col-xs-12">
                <div class="box">

                    <div class="box-header with-border">
                        <h3 class="box-title">
                            <a type="button" class="btn " href="/admin/topics/create" >增加专题</a>
                        </h3>
                    </div>

                    <!-- /.box-header -->
                    <div class="box-body">
                        <table class="table table-bordered">
                            <tbody><tr>
                                <th style="width: 10px">#</th>
                                <th>专题名称</th>
                                <th>操作</th>
                            </tr>
                            @foreach($topics as $topic)
                            <tr>
                                <td>{{$topic->id}}</td>
                                <td>{{$topic->name}}</td>
                                <td>
                                    <a type="button" class="btn topic-delete" delete-url="/admin/topics/{{$topic->id}}" href="#" >删除</a>
                                </td>
                            </tr>
                            @endforeach
                            </tbody></table>
                    </div>

                    <div id="pagination">
                        {{$topics->links()}}
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- /.content -->
@endsection